package tech.horgee.task;

import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import tech.horgee.schedule.ICronTask;

import java.time.LocalTime;

/**
 * 定时任务Demo
 */
@Slf4j
@Service
public class DemoTask implements ICronTask {

    @Override
    public void run(Object... args) {
        try {
            Thread.sleep(2000);
        } catch (InterruptedException e) {
            log.error("err", e);
        }
        log.info("Test：" + LocalTime.now());
    }
}
